home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5327 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  37 lines

  1. Newsgroups: comp.lang.c++
  2. Subject: Removing 320x200 256 color PCX files out of memory
  3. From: fender@prostar.com (Fender)
  4. Path: news3.noc.netcom.net!prostar.com
  5. Message-ID: <00000DEA00001B9F@prostar.com>
  6. Date: 3 Feb 96 11:49:41 PDT
  7. Organization: ProStar Plus Internet
  8.  
  9. Hello,
  10.  
  11. I'm trying to write a game right now that lets the user hit N to go north S 
  12. to go south. A fairly primative game. But in each room it draws up a .PCX 
  13. file to display what the room looks like. But I can only get about six 
  14. rooms into the game until my computer freezes.
  15.  
  16. I suppose this is because the PCX files are taking up all of my memory 
  17. until I don't have any left. This is pretty much an outline of the rooms:
  18.  
  19. room1:
  20.  
  21.         clearscreen
  22.         loadpcx("room1.pcx");
  23.         for(long i=0; i<6400; i++) //displays it
  24.  
  25.  
  26. room2:
  27.                         etc...
  28.  
  29.  
  30. if anyone can help me. Like tell me how to delete them out of memory, I 
  31. would be extremly gratified. And perhaps could give the next version of my
  32. game to!
  33.  
  34.                                                 Thank you all
  35.                                                 Al Clark
  36.  
  37.